package com.y2.authprj.bean.auth.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.y2.authprj.utils.DateUtil;

public class RoleInfo implements Serializable{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6763276729027732714L;
	private Integer roleauthorityId;
	private Integer roleId;
	private Integer functionauthorityId;
	private Integer deleteFlag;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	//默认为国际时间
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date createTime;
	private SysroleInfo sysroleInfo;
	private FunctionauthorityInfo functionauthorityInfo;
	private Integer[] rid;
	private Integer[] functionid;
	
	public Integer[] getRid() {
		return rid;
	}
	public void setRid(Integer[] rid) {
		this.rid = rid;
	}
	public Integer[] getFunctionid() {
		return functionid;
	}
	public void setFunctionid(Integer[] functionid) {
		this.functionid = functionid;
	}
	public Integer getRoleauthorityId() {
		return roleauthorityId;
	}
	public void setRoleauthorityId(Integer roleauthorityId) {
		this.roleauthorityId = roleauthorityId;
	}
	public Integer getRoleId() {
		return roleId;
	}
	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}
	public Integer getFunctionauthorityId() {
		return functionauthorityId;
	}
	public void setFunctionauthorityId(Integer functionauthorityId) {
		this.functionauthorityId = functionauthorityId;
	}
	public Integer getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public SysroleInfo getSysroleInfo() {
		return sysroleInfo;
	}
	public void setSysroleInfo(SysroleInfo sysroleInfo) {
		this.sysroleInfo = sysroleInfo;
	}
	public FunctionauthorityInfo getFunctionauthorityInfo() {
		return functionauthorityInfo;
	}
	public void setFunctionauthorityInfo(FunctionauthorityInfo functionauthorityInfo) {
		this.functionauthorityInfo = functionauthorityInfo;
	}
	public RoleInfo(Integer roleauthorityId, Integer roleId, Integer functionauthorityId, Integer deleteFlag,
			Date createTime, SysroleInfo sysroleInfo, FunctionauthorityInfo functionauthorityInfo) {
		super();
		this.roleauthorityId = roleauthorityId;
		this.roleId = roleId;
		this.functionauthorityId = functionauthorityId;
		this.deleteFlag = deleteFlag;
		this.createTime = createTime;
		this.sysroleInfo = sysroleInfo;
		this.functionauthorityInfo = functionauthorityInfo;
	}
	public RoleInfo() {
		super();
	}
	@Override
	public String toString() {
		return "RoleInfo [roleauthorityId=" + roleauthorityId + ", roleId=" + roleId + ", functionauthorityId="
				+ functionauthorityId + ", deleteFlag=" + deleteFlag + ", createtTime=" + createTime + ", sysroleInfo="
				+ sysroleInfo + ", functionauthorityInfo=" + functionauthorityInfo + "]";
	}

	public String getCreateDateStr(){
		return DateUtil.formate(this.getCreateTime());
	}
	
}
